//
//  ViewController.m
//  SDownLoader
//
//  Created by Song on 2017/7/11.
//  Copyright © 2017年 Song. All rights reserved.
//

#import "ViewController.h"
#import "SDownLoader.h"
@interface ViewController ()

@property (nonatomic,strong) SDownLoader *downLoader;

@end

@implementation ViewController

-(SDownLoader *)downLoader {
    
    if (!_downLoader) {
        _downLoader = [[SDownLoader alloc] init];
    }
    return _downLoader;
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    NSURL* url = [NSURL URLWithString:@"http://img008.hc360.cn/g8/M07/81/FE/wKhQtlQCncqEAfBjAAAAAArSKnQ186.jpg"];
    [self.downLoader downLoader:url];
    
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
